/* 需求管理页面样式 */

/* 筛选面板样式 */
.filter-panel {
    transition: all 0.3s ease;
}

.filter-panel .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 需求列表表格样式 */
.requirement-list .table {
    margin-bottom: 0;
}

.requirement-list .table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.requirement-list .table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* 优先级标签样式 */
.priority-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.priority-high {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.priority-urgent {
    background-color: #dc3545;
    color: #ffffff;
    border: 1px solid #dc3545;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}



/* 状态标签样式 */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-draft {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-approved {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-cancelled {
    background-color: #f1f3f4;
    color: #6c757d;
    border: 1px solid #dee2e6;
    text-decoration: line-through;
}

/* 参考文档样式 */
.reference-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.doc-link:hover {
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
}

.doc-link i {
    margin-right: 0.25rem;
    font-size: 0.625rem;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.action-buttons .btn-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
}

/* 模态框中的参考文档管理 */
.reference-documents {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.document-item:last-child {
    margin-bottom: 0;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.document-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.document-url {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: none;
}

.document-url:hover {
    color: #007bff;
    text-decoration: underline;
}

.document-actions {
    display: flex;
    gap: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .requirement-list .table-responsive {
        font-size: 0.875rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .priority-badge,
    .status-badge {
        font-size: 0.6875rem;
        padding: 0.125rem 0.25rem;
    }
    
    .reference-docs {
        flex-direction: column;
    }
    
    .doc-link {
        width: 100%;
        justify-content: center;
    }
}

/* 表格行悬停效果 */
.requirement-list .table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* 选中行样式 */
.requirement-list .table tbody tr.selected {
    background-color: #e3f2fd;
}

/* 加载动画 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 空状态样式 */
#emptyState {
    padding: 3rem 1rem;
}

#emptyState .display-1 {
    font-size: 4rem;
    opacity: 0.3;
}

/* 分页样式优化 */
.pagination {
    margin-top: 1.5rem;
}

.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* 筛选按钮激活状态 */
#filterBtn.active {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.75rem;
}

/* 表格固定列宽 */
.requirement-list .table th:nth-child(1),
.requirement-list .table td:nth-child(1) {
    width: 40px;
    text-align: center;
}

.requirement-list .table th:nth-child(3),
.requirement-list .table td:nth-child(3) {
    width: 120px;
}

.requirement-list .table th:nth-child(4),
.requirement-list .table td:nth-child(4) {
    width: 80px;
    text-align: center;
}

.requirement-list .table th:nth-child(5),
.requirement-list .table td:nth-child(5) {
    width: 100px;
    text-align: center;
}

.requirement-list .table th:nth-child(6),
.requirement-list .table td:nth-child(6) {
    width: 100px;
}

.requirement-list .table th:nth-child(7),
.requirement-list .table td:nth-child(7) {
    width: 120px;
    text-align: center;
}

.requirement-list .table th:nth-child(8),
.requirement-list .table td:nth-child(8) {
    width: 120px;
    text-align: center;
}

.requirement-list .table th:nth-child(9),
.requirement-list .table td:nth-child(9) {
    width: 150px;
    text-align: center;
}

/* 文本截断 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}

/* 需求标题链接样式 */
.requirement-title {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.requirement-title:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 批量操作工具栏 */
.bulk-actions {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: none;
}

.bulk-actions.show {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bulk-actions .selected-count {
    font-weight: 600;
    color: #495057;
}

.bulk-actions .btn-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}